import { createApp } from 'vue'
import App from './App.vue'
// import './utils/uni.webview.1.5.4.js'
import router from './router'
import store from './store/index.js'
import './permission'
import 'lib-flexible'
// import VueLazyload from 'vue-lazyload-next';
// import { Lazyload } from 'vant';
// import VueLazyload from 'vue-lazyload'
// import { findAgentInfoByAgentNo } from '@/api/dataAnalysis'
import './styles/common.css' // vite 使用 sass 只需 npm i -D sass，这个和 webpack 不一样
// import Vconsole from 'vconsole'
// const vConsole = new Vconsole() //打印1000次后自动清除
// 部分代码展示
import * as echarts from 'echarts'
import 'vant/es/toast/style';
import 'vant/lib/index.css';
const app = createApp(App)
import empty from '@/components/empty/index.vue'
app.component('empty', empty)
// vue3 给原型上挂载属性
app.config.globalProperties.$echarts = echarts

import { Toast, Dialog, Search } from 'vant'
// app.use(Lazyload);

 
// app.use(VueLazyload, {
//   // 设置懒加载时的占位图
//   loading: 'path/to/loading-image.gif',
//   // 设置图片加载失败时的占位图
//   error: 'path/to/error-image.png'
// })
app.use(Toast);
app.use(Dialog);
createApp(App).use(router).use(store).mount('#app')
// store.dispatch('user/GetUserInfo', '9D9DFAF1B0ADB8D525DE86CA42EF7D61')
// findAgentInfoByAgentNo({}).then(res=>{
//     store.dispatch("user/GetUserAllInfo", res.object)
//     createApp(App).use(router).use(store).mount('#app')
// })
// window.setToken = token => {
//     store.dispatch("user/GetUserInfo", token)
//     window.setAgentNo = agentNo => {
//         store.dispatch("user/GetUserInfo1", agentNo)
//         createApp(App).use(router).use(store).mount('#app')
//     }
// }
// store.dispatch('user/GetUserInfo', 'D2F6471DBD2AE8550D740F86EFC35B62')